﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/POS.master" CodeFile="SearchEmployee.aspx.cs" Inherits="HR_SearchEmployee" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        textarea {
            resize: none;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <div class="container">
        <div class="main-title">
            <label class="control-label" for="Title">Search Employee</label>
        </div>
        <div class="form-horizontal" id="divEmployeeWrapper">
            <div class="form-group">
                <label class="control-label col-sm-4" for="City">Department :</label>
                <div class="col-sm-6">
                    <asp:DropDownList ID="DDL_Department" CssClass="form-control" DataValueField="Dept_Id" DataTextField="Dept_Name" runat="server"></asp:DropDownList>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-sm-4" for="Address">Sub Department :</label>
                <div class="col-sm-6">

                    <asp:DropDownList ID="DDL_SubDepartment" DataValueField="SubDeptId" DataTextField="SubDeptName" CssClass="form-control" runat="server"></asp:DropDownList>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-4 col-sm-8">
                    <asp:Button id="btnSearch" Cssclass="btn btn-success" Text="Search" runat="server" onclick="btnSearch_Click" />

                </div>
            </div>
        </div>
         <asp:GridView runat="server" ID="GVEmployees" AutoGenerateColumns="False" CssClass="col-sm-10 grid" AllowPaging="True" PageSize="5" 
            AlternatingRowStyle-BackColor="#ccffff" >
<AlternatingRowStyle BackColor="#CCFFFF"></AlternatingRowStyle>
            <Columns>
                <asp:TemplateField HeaderText="Sr.#">
                    <ItemTemplate>
                        <%#Container.DataItemIndex+1 %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Name">
                    <ItemTemplate>
                        <asp:Label ID="lblEmpName"  Text='<%#Bind("EmpName") %>' runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="Cell">
                    <ItemTemplate>
                        <asp:Label ID="lblCell" Text='<%#Bind("Cell") %>' runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="City">
                    <ItemTemplate>
                        <asp:Label ID="lblCityName"  Text='<%#Bind("City_Name") %>' runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="Address">
                    <ItemTemplate>
                        <asp:Label ID="lblAddress" Text='<%#Bind("Address") %>' runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="SubDepartment">
                    <ItemTemplate>
                        <asp:Label ID="lblSubDeptName" Text='<%#Bind("SubDeptName") %>' runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="Delete">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtnDeleteEmployee" CausesValidation="false" Text="Delete" CommandArgument='<%#Bind("EmpID") %>' OnClick="lbtnDeleteEmployee_Click" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Login Detail">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtnViewLogin" CausesValidation="false" Text="Login Detail" CommandArgument='<%#Bind("EmpID") %>' OnClick="lbtnViewLogin_Click" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:HyperLinkField DataNavigateUrlFormatString="~/HR/AddEditEmployee.aspx?EmpID={0}" DataNavigateUrlFields="EmpID" Target="_blank" Text="Edit" HeaderText="Edit" />
            </Columns>
        </asp:GridView>
        </div>

</asp:Content>

